Optimal. Leaf size=44 \[ \frac {a^2 x^2}{2}+\frac {a b \text {ArcTan}\left (\sinh \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tanh \left (c+d x^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {5544, 3858,
3855, 3852, 8} \begin {gather*} \frac {a^2 x^2}{2}+\frac {a b \text {ArcTan}\left (\sinh \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tanh \left (c+d x^2\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3858
Rule 5544
Rubi steps
\begin {align*} \int x \left (a+b \text {sech}\left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \text {Subst}\left (\int (a+b \text {sech}(c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}+(a b) \text {Subst}\left (\int \text {sech}(c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \text {Subst}\left (\int \text {sech}^2(c+d x) \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}+\frac {a b \tan ^{-1}\left (\sinh \left (c+d x^2\right )\right )}{d}+\frac {\left (i b^2\right ) \text {Subst}\left (\int 1 \, dx,x,-i \tanh \left (c+d x^2\right )\right )}{2 d}\\ &=\frac {a^2 x^2}{2}+\frac {a b \tan ^{-1}\left (\sinh \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tanh \left (c+d x^2\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 44, normalized size = 1.00 \begin {gather*} \frac {a \left (a \left (c+d x^2\right )+2 b \text {ArcTan}\left (\sinh \left (c+d x^2\right )\right )\right )+b^2 \tanh \left (c+d x^2\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 1.56, size = 73, normalized size = 1.66
method | result | size |
risch | \(\frac {a^{2} x^{2}}{2}-\frac {b^{2}}{d \left (1+{\mathrm e}^{2 d \,x^{2}+2 c}\right )}+\frac {i b a \ln \left ({\mathrm e}^{d \,x^{2}+c}+i\right )}{d}-\frac {i b a \ln \left ({\mathrm e}^{d \,x^{2}+c}-i\right )}{d}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 46, normalized size = 1.05 \begin {gather*} \frac {1}{2} \, a^{2} x^{2} + \frac {a b \arctan \left (\sinh \left (d x^{2} + c\right )\right )}{d} + \frac {b^{2}}{d {\left (e^{\left (-2 \, d x^{2} - 2 \, c\right )} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 194 vs.
\(2 (40) = 80\).
time = 0.37, size = 194, normalized size = 4.41 \begin {gather*} \frac {a^{2} d x^{2} \cosh \left (d x^{2} + c\right )^{2} + 2 \, a^{2} d x^{2} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + a^{2} d x^{2} \sinh \left (d x^{2} + c\right )^{2} + a^{2} d x^{2} - 2 \, b^{2} + 4 \, {\left (a b \cosh \left (d x^{2} + c\right )^{2} + 2 \, a b \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + a b \sinh \left (d x^{2} + c\right )^{2} + a b\right )} \arctan \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right )\right )}{2 \, {\left (d \cosh \left (d x^{2} + c\right )^{2} + 2 \, d \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + d \sinh \left (d x^{2} + c\right )^{2} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (a + b \operatorname {sech}{\left (c + d x^{2} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 55, normalized size = 1.25 \begin {gather*} \frac {{\left (d x^{2} + c\right )} a^{2}}{2 \, d} + \frac {2 \, a b \arctan \left (e^{\left (d x^{2} + c\right )}\right )}{d} - \frac {b^{2}}{d {\left (e^{\left (2 \, d x^{2} + 2 \, c\right )} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 77, normalized size = 1.75 \begin {gather*} \frac {a^2\,x^2}{2}+\frac {2\,\mathrm {atan}\left (\frac {a\,b\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {d^2}}{d\,\sqrt {a^2\,b^2}}\right )\,\sqrt {a^2\,b^2}}{\sqrt {d^2}}-\frac {b^2}{d\,\left ({\mathrm {e}}^{2\,d\,x^2+2\,c}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________